package com.cjkj.applet.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 小程序端账号绑定设备情况对象 applet_bind_info
 * 
 * @author cjkj
 * @date 2024-08-30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AppletBindInfo
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 微信账户ID */
    private Long accountId;

    /** 设备类型 */
    private String equipmentType;

    /** 设备编号 */
    private String equipmentNo;

    /** 绑定时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 解绑时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 绑定状态：0=绑定中，1=已解绑 */
    private String bindFlag;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("accountId", getAccountId())
            .append("equipmentType", getEquipmentType())
            .append("equipmentNo", getEquipmentNo())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("bindFlag", getBindFlag())
            .toString();
    }
}
